const insertServicse = require("../servicse/insert")
const add = async (req, res) => {
    let fields = req.body
    let sql = `commoditycategory`;
    let routs = await insertServicse.add(sql, fields)
    res.send({code:0,msg:'success',data:routs.insertId});
}
const select = async (req, res) => {
    let sql = `commoditycategory`;
    let routs = await insertServicse.select1(sql);
    // console.log(routs);
    res.send(routs);
}
const up = async (req, res) => {
    let sql = `commoditycategory`;
    let fields = req.body
    let routs = await insertServicse.upda(sql,fields);
    console.log(routs);
    res.send(routs);
}
module.exports = {
    add,
    select,
    up
}